Helpful Information
 
 
Category: Security and Cryptography
Disabling "File/Save As" and "View/Source"

Hi All,

Just to clarify, this is not the same thread as the “How can i hide the html source code from the browser view source??????”

I don’t care about hiding my code or stopping users from right-clicking on my web page. Please resist the temptation to discuss these “off topic” subjects in this thread. I am trying to understand some strange behavior that I observed.

The goal here is simple: To discover why some web pages will disable the “File/Save As” and “View/Source” menu options, while most do not.

I recently visited two different sites that had something in common… The first time I accessed these sites, my “File/Save As” and “View/Source” menu items became disabled (grayed out, not selectable, whatever.). I was able to add “view-source:” in front of the URL and actually view the source for each page, but there was nothing that I could see in the source for either page that would cause this to happen.

I tried using my back button to go to a previous page and much to my surprise, the menu options were still disabled. In fact no matter what page I moved to the menu options remained disabled.

Finally, I quit my browser (IE 5.5), then restarted it. Everything was back to normal… I was able to view source and save as just like always. I decided to return to the both of the “offending” pages and now the “File/Save As” and “View/Source” menu options were ENABLED.

I want to know 3 things:
1. Why did this behavior occur and only one time?
2. How can I write a web page that will recreate it?
3. How can I reproduce this behavior every time and not just the first time?

Here are the two links (remember, it will only work once, as far as I know):
www.nokia.com
www.foresightps.com

Good luck!

Thanks,
William

Weren't grayed out for me. I imagine it happened on an earlier site in that browser instance, you just didn't notice it.

You can do this with JavaScript. Check the JS forum.

They weren't grayed out for me either.....

But I had the exact same scenario on a site

http://www.kimage.com.sg

I can now view the source and saveas functions.

Thats why I'm here now really.... trying to discover how to do it myself!!!

Ora best,
Scotty....

I apologize if this isn''t the case, but you can't view the source or save a web page in explorer until the page has finished loading.

I thought I ran into the same thing once before, but it was just being caused by a slow banner on the page.

thobbes brings up a good point, but it does not explain why the "File/Save As" and "View/Source" continue to stay disabled until the browser (IE 5.5) is stopped and restarted.

Keep on testing...

Hi,
:rolleyes:
if you look at the nokia.com site, you can see a link named DEMO-Link. Clicking this link starts a new site without menues, toolbars and so on. If you look in the sourcecode of the main-site, you can see that this new window is started by a javascript-function (windowopenerX). In this function you can see how to lock off different properties of the explorer-window. The only problem of this solution: I think it works not with all types of browser.










privacy (GDPR)